package com.test.kotlin05

class LazyClass(_name:String) {
    var name = _name
    val config by lazy {
        loadConfig()
    }

    private fun loadConfig():String{
        println("loadConfig……")
        return "xxx"
    }

}

fun main() {
    var  clazz = LazyClass("test");
    Thread.sleep(30000)
    println(clazz.config)
}